import React, { useEffect } from "react";
import { Platform, StyleSheet, Linking, Alert } from "react-native";
import { useRouter, Redirect } from "expo-router";
import useUser from "@/hooks/useUser";

export default function Index() {
  const router = useRouter(); // 获取路由对象
  const { isLoggedIn } = useUser();

  return isLoggedIn ? (
    <Redirect href={"/(tabs)"}></Redirect>
  ) : (
    <Redirect href={"/(auth)/login"}></Redirect>
  );
}

const styles = StyleSheet.create({});
